package com.aspose.cells;

public class TxtSaveOptions extends SaveOptions {
   private String b;
   private Encoding j = Encoding.getDefault();
   boolean a = true;
   private int k = 0;

   public TxtSaveOptions() {
      this.c = 1;
      this.b = ",";
   }

   public TxtSaveOptions(int format) {
      this.c = format;
      switch(format) {
      case 0:
         this.c = 1;
         this.b = ",";
         break;
      case 1:
         this.b = ",";
         break;
      case 11:
         this.b = "\t";
      }

   }

   TxtSaveOptions(int format, SaveOptions options) {
      this.c = format;
      switch(format) {
      case 0:
         this.c = 1;
         this.b = ",";
         break;
      case 1:
         this.b = ",";
         break;
      case 11:
         this.b = "\t";
      }

      this.b(options);
   }

   public char getSeparator() {
      return this.b != null && this.b.length() >= 1 ? this.b.charAt(0) : ',';
   }

   public void setSeparator(char value) {
      this.b = "" + value;
   }

   public String getSeparatorString() {
      return this.b;
   }

   public void setSeparatorString(String value) {
      this.b = value;
   }

   public Encoding getEncoding() {
      return this.j;
   }

   public void setEncoding(Encoding value) {
      this.j = value;
      this.a = false;
   }

   static TxtSaveOptions a(WorkbookSettings var0, int var1, SaveOptions var2) {
      TxtSaveOptions var3 = null;
      if (var2 instanceof TxtSaveOptions) {
         var3 = (TxtSaveOptions)var2;
      } else {
         var3 = new TxtSaveOptions(var1, var2);
      }

      if (!var0.i) {
         var3.setEncoding(var0.f());
      }

      return var3;
   }

   /** @deprecated */
   public boolean getAlwaysQuoted() {
      return this.k == 1;
   }

   /** @deprecated */
   public void setAlwaysQuoted(boolean value) {
      this.k = value ? 1 : 0;
   }

   public int getQuoteType() {
      return this.k;
   }

   public void setQuoteType(int value) {
      this.k = value;
   }
}
